<?php

if( !defined('config') )
{
    define('config', 'true', false);

$GLOBALS['database'] = 'dms'; 
$GLOBALS['user'] = 'root';
$GLOBALS['pass'] = 'root'; 
$GLOBALS['hostname'] = 'localhost'; 

global $CONFIG;      $CONFIG = array(

'db_prefix' => 'dms_',

'debug' => '0',

'demo' => 'false', 

'authen' => 'mysql',

'page_limit' => '15',

'num_page_limit' => '10', 

'displayable_len' => '15',

'base_url' => 'http://dms/',

'title' => 'Document Repository',

'site_mail' => 'root@localhost',

'root_username'  => 'admin',

'dataDir' => 'E:\data',

'max_filesize' => '5000000',

'revision_expiration' => '90',

'file_expired_action' => '1', 

'authorization' => 'On',

'secureurl' => 'On',

'treeview' => 'On',

'allow_signup' => 'Off',

'allow_password_reset' => 'Off',

'try_nis' => 'Off',

'theme' => 'default'
);

//Toegelaten extensies voor upload//

$GLOBALS['allowedFileTypes'] = array(
'.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'image/gif', 
'text/html', 
'text/plain', 
'application/pdf', 
'application/x-pdf', 
'application/x-lyx', 
'application/msword', 
'image/jpeg', 
'image/pjpeg', 
'image/png', 
'application/msexcel', 
'application/msaccess', 
'text/richtxt', 
'application/mspowerpoint', 
'application/octet-stream', 
'application/x-zip-compressed',
'image/tiff',
'image/tif',
'application/vnd.ms-powerpoint',
'application/vnd.ms-excel',
'.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'.xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template',
'.potx application/vnd.openxmlformats-officedocument.presentationml.template',
'.ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow',
'.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation',
'.sldx application/vnd.openxmlformats-officedocument.presentationml.slide',
'.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'.dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template',
'.xlam application/vnd.ms-excel.addin.macroEnabled.12',
'.xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12',
);



if (is_file('config_local.php'))
{
    include('config_local.php');
}
elseif (is_file('../config_local.php'))
{
    include('../config_local.php');
}


$CONFIG['revisionDir'] = $GLOBALS['CONFIG']['dataDir'] . 'revisionDir/';

$CONFIG['archiveDir'] = $GLOBALS['CONFIG']['dataDir'] . 'archiveDir/';

$GLOBALS['connection'] = mysql_connect($GLOBALS['hostname'], $GLOBALS['user'], $GLOBALS['pass']) or die ("Unable to connect: " . mysql_error());
$db = mysql_select_db($GLOBALS['database'], $GLOBALS['connection']);

include_once('functions.php');

$_GET = sanitizeme($_GET);
$_REQUEST = sanitizeme($_REQUEST);
$_POST = sanitizeme($_POST);
$_SERVER = sanitizeme($_SERVER);
}
?>
